<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xml:lang="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Guideline: Continuous Integration</title>
<meta name="uma.type" content="Guideline">
<meta name="uma.name" content="continuous_integration">
<meta name="uma.presentationName" content="Continuous Integration">
<meta name="element_type" content="other">
<meta name="filetype" content="description">
<meta name="role" content="">
<link rel="StyleSheet" href="./../../../css/default.css" type="text/css">
<script src="./../../../scripts/ContentPageResource.js" type="text/javascript" language="JavaScript"></script><script src="./../../../scripts/ContentPageSection.js" type="text/javascript" language="JavaScript"></script><script src="./../../../scripts/ContentPageSubSection.js" type="text/javascript" language="JavaScript"></script><script src="./../../../scripts/ContentPageToolbar.js" type="text/javascript" language="JavaScript"></script><script src="./../../../scripts/contentPage.js" type="text/javascript" language="JavaScript"></script><script type="text/javascript" language="JavaScript">
					var backPath = './../../../';
					var imgPath = './../../../images/';
					var nodeInfo=null;
					contentPage.preload(imgPath, backPath, nodeInfo,  '', false, false, false);
				</script>
</head>
<body>
<div id="breadcrumbs"></div>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top"><a name="Top"></a>
<div id="page-guid" value="_i8bUEL6cEdqti4GwqTkbsQ"></div>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td class="pageTitle" nowrap="true">Guideline: Continuous Integration</td><td width="100%">
<div align="right" id="contentPageToolbar"></div>
</td><td width="100%" class="expandCollapseLink" align="right"><a name="mainIndex" href="./../../../index.htm"></a><script language="JavaScript" type="text/javascript" src="./../../../scripts/treebrowser.js"></script></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="pageTitleSeparator"><img src="./../../../images/shim.gif" alt="" title="" height="1"></td>
</tr>
</table>
<div class="overview">
<table width="97%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50"><img src="./../../../images/guidance.gif" alt="" title=""></td><td>
<table class="overviewTable" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">This guideline describes how to apply continuous integration to reduce the risk and effort associated with late integration.</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div class="sectionHeading">Relationships</div>
<div class="sectionContent">
<table class="sectionTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<th class="sectionTableHeading" scope="row">Related Elements</th><td class="sectionTableCell">
<ul>
<li>
<a href="./../../../practice.tech.continuous_integration.base/workproducts/build_95D7D8FD.html" guid="_0YuXEMlgEdmt3adZL5Dmdw">Build</a>
</li>
<li>
<a href="./../../../practice.tech.continuous_integration.base/tasks/integrate_and_create_build_6191BF5D.html" guid="_kkZBgJOKEdyaRbFYa4AN4A">Integrate and Create Build</a>
</li>
</ul>
</td>
</tr>
</table>
</div>
<div class="sectionHeading">Main Description</div>
<div class="sectionContent">
<table class="sectionTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td class="sectionTableSingleCell"><p>
    Continuous integration is a software development practice that completely rebuilds and tests the application frequently
    -- ideally, every time a change is introduced. This approach provides many benefits as outlined in&nbsp;<a class="elementLink" href="./../../../practice.tech.continuous_integration.base/guidances/practices/continous_integration_58673D65.html" guid="_rJNiMB4rEd2bS8fFOQ7WWA">Continuous Integration</a> and in <a class="elementLinkWithUserText" href="./../../../core.default.nav_view.base/guidances/supportingmaterials/references_C6FF2A8D.html#WIKP-CI" guid="__nHToFndEd2EdJKkAyeBng">[WIKP-CI]</a>.
</p>
<h3>
    Basic steps
</h3>
<p>
    The detailed application of continuous integration depends on which tools you use (configuration management system,
    automated build tool, automated test tool, and so forth). However, these are the basic steps:
</p>
<ol>
    <li>
        A developer, let's call her Jane, selects a&nbsp;work item&nbsp;to work on.
    </li>
    <li>
        Jane updates her <a class="elementLink" href="./../../../practice.tech.continuous_integration.base/guidances/concepts/workspace_722BBA90.html" guid="_0cEmAMlgEdmt3adZL5Dmdw">Workspace</a> to include the most recent <a class="elementLink" href="./../../../core.tech.slot.base/workproducts/software_implementation_slot_E92F6A39.html" guid="_Vux8UEfUEdyiPI8btkmvmw">[Software Implementation]</a> from the integration workspace.
    </li>
    <li>
        Jane makes her changes in her workspace to both her developer tests and to the implementation, and then she tests
        the changes.
    </li>
    <li>
        Before committing the changes, Jane updates her workspace again (because other developers may have introduced
        conflicting changes) and reruns her developer tests.
    </li>
    <li>
        If these tests are successful, the changes are promoted (see <a class="elementLinkWithType" href="./../../../practice.tech.continuous_integration.base/guidances/guidelines/promoting_changes_9087B764.html" guid="_SM4YIL6dEdqti4GwqTkbsQ">Guideline: Promoting Changes</a>) to&nbsp;the&nbsp;integration workspace.
    </li>
    <li>
        A complete <a class="elementLink" href="./../../../practice.tech.continuous_integration.base/workproducts/build_95D7D8FD.html" guid="_0YuXEMlgEdmt3adZL5Dmdw">Build</a> of the application is performed by using the implementation from the
        integration workspace, and the entire suite of developer tests is run on this build.
    </li>
    <li>
        If any of these tests fail, the team is notified, and the failed test should be addressed as soon as possible.
    </li>
    <li>
        This process repeats as the team develops and continuously integrates and tests functionality in small increments.
    </li>
</ol>
<h3>
    Constraints
</h3>
<p>
    Conceptually, continuous integration can be performed manually (see <a class="elementLinkWithUserText" href="./../../../core.default.nav_view.base/guidances/supportingmaterials/references_C6FF2A8D.html#SHO06" guid="__nHToFndEd2EdJKkAyeBng">[SHO06]</a> for example). However, in practice, there are several constraints that must
    be respected for it to be effective:
</p>
<ol>
    <li>
        All changes must be introduced into a tested configuration that you know to be good.
    </li>
    <li>
        The integrate-build-test cycle must be fast enough so that it can be completed quickly and the team notified of the
        results. Many published guidelines promote a 10-minute cycle.
    </li>
    <li>
        Keep the <a class="elementLink" href="./../../../core.mgmt.common.extend_supp/guidances/concepts/change_set_430BF233.html" guid="_1QU9MAIoEdyLh7vsrHZ4YA">Change Set</a>s&nbsp;small enough so that the work can be completed and integration
        performed several times per day. Many published guidelines promote a 2- to 4-hour cycle between integrations.
    </li>
</ol>
<p>
    These constraints imply the need for a configuration management (CM) repository to maintain configuration information
    (Item 1 listed previously), automated build and test tools to meet the turnaround constraints (Item 2), and proper
    planning and discipline by developers to ensure that their work items and change sets are small enough to complete
    quickly (Item 3).
</p>
<p>
    For a more detailed description of continuous integration, see <a class="elementLinkWithUserText" href="./../../../core.default.nav_view.base/guidances/supportingmaterials/references_C6FF2A8D.html#FOW06" guid="__nHToFndEd2EdJKkAyeBng">[FOW06]</a> or <a class="elementLinkWithUserText" href="./../../../core.default.nav_view.base/guidances/supportingmaterials/references_C6FF2A8D.html#WIKP-CI" guid="__nHToFndEd2EdJKkAyeBng">[WIKP-CI]</a>.
</p></td>
</tr>
</table>
</div>
<table class="copyright" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="copyright"><p> This program and the accompanying materials are made available under the<br />
  <a href="http://www.eclipse.org/org/documents/epl-v10.php" target="_blank">Eclipse 
  Public License V1.0</a>, which accompanies this distribution. </p><p/><p> <a class="elementLink" href="./../../../core.default.release_copyright.base/guidances/supportingmaterials/openup_copyright_C3031062.html" guid="_UaGfECcTEduSX6N2jUafGA">OpenUP Copyright</a></p></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
<script type="text/javascript" language="JavaScript">
				contentPage.onload();
			</script>
</html>
